﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IPagedList<sp_GetGlobalSearchResult>>" %>
<ul  style="list-style: none !important; width: 650px; margin-top: 10px;
    margin-left: -5px;">
    <%List<sp_GetGlobalSearchResult> listNewPartner = (List<sp_GetGlobalSearchResult>)ViewData.Model;
      foreach (sp_GetGlobalSearchResult item in listNewPartner)
      {
          string alias = "/san-pham/" + item.Alias + ".html";
    %>
    <li style="width: 150px; float: left; padding-bottom: 10px;">
        <div class="prodformat_box">
            <div class="roundedcornr_top">
            </div>
            <div class="roundedcornr_content">
                <a href="<%=alias%>">
                    <img class="imag" src="<%=Constants.UPLOAD_VITUAL_IMAGE_PATH + item.Logo%>" width="132"
                        height="120" />
                </a>
                <div class="prodname_newrelease">
                <a href="<%=alias%>">
                    <strong>
                        <%= Html.Encode(item.PartnerName)%></strong></a></div>
                <br />
                <div class="pricebg_outabout">
                    <table class="prodprice_special">
                        <tbody>
                            <tr>
                                <td>
                                    <%=(!item.CurrentPrice.HasValue ? "Liên hệ" : String.Format("{0:0,0}", item.CurrentPrice))%>
                                    <% if (item.OldPrice.HasValue)
                                       { %>
                                    <div class="prodrrpprice">
                                        <%=String.Format("{0:0,0}", item.OldPrice.Value)%>
                                    </div>
                                    <%} %>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="roundedcornr_bottom">
                <div>
                </div>
            </div>
        </div>
    </li>
    <%}%>
</ul>
<div class="clr">
</div>
<div class="pagination">
    <%= Ajax.Pager(new AjaxOptions { UpdateTargetId = "pProductList", OnBegin = "beginPaging", OnSuccess = "successPaging", OnFailure = "failurePaging" },
                                                                     ViewData.Model.PageSize, ViewData.Model.PageNumber, ViewData.Model.TotalItemCount, new { controller = "Home", action = "AdvanceSearch" })%>
</div>
